package com.wjf.birdfish.util;

import java.util.Properties;

/**
 * 获取服务器系统信息
 * */
public class SystemProperties {
	public SystemProperties() {
		getAllProperties();
	}

	private String osName;// 操作系统名称
	private String osArch;// 操作系统架构
	private String osVersion;// 操作系统版本
	private String fileSeparator;// 文件分割符
	private String pathSeparator;// 路径分割符

	public String getOsName() {
		return osName;
	}

	public void setOsName(String osName) {
		this.osName = osName;
	}

	public String getOsArch() {
		return osArch;
	}

	public void setOsArch(String osArch) {
		this.osArch = osArch;
	}

	public String getOsVersion() {
		return osVersion;
	}

	public void setOsVersion(String osVersion) {
		this.osVersion = osVersion;
	}

	public String getFileSeparator() {
		return fileSeparator;
	}

	public void setFileSeparator(String fileSeparator) {
		this.fileSeparator = fileSeparator;
	}

	public String getPathSeparator() {
		return pathSeparator;
	}

	public void setPathSeparator(String pathSeparator) {
		this.pathSeparator = pathSeparator;
	}

	public void getAllProperties() {
		Properties props = System.getProperties();
		osName = props.getProperty("os.name");
		osArch = props.getProperty("os.arch");
		osVersion = props.getProperty("os.version");
		fileSeparator = props.getProperty("file.separator");
		pathSeparator = props.getProperty("path.separator");
	}

}
